Ocean and Ecosystem Science Seminar Series | BIO | 2019-11-06

Background

The greatest value of a picture is when it forces us to notice
what we never expected to see.
   - Tukey (1977)

  • Discovery is one of the most exciting parts of science
  • Visualizations are one of the tools we use to reveal patterns
  • Models allow us to simplify and describe these patterns
  • At various stages, we need to communicate our findings

Communicating information

Simplified workflow:


Data


\(\rightarrow\)

Models


\(\rightarrow\)

Discuss


  • Connections may not come easy
    • Growing volume and variety of data
    • Increasingly complex models
    • Diverse backgrounds

Stock assessments

  • Communicating stock assessment results isn’t getting easier
    • Growing volume and variate of data
    • Increasingly complex models
    • Diverse backgrounds
  • Traditional formats sometimes
    • Overwhelm participants with endless tables and figures
    • Fail to convey the richness of information available

Interactive tools

  • Simplify communication and improve accessibility
  • Common tools that are used daily on a range of websites
  • Their use is no longer restricted to website developers
    • Integrated into software commonly used by the research community
    • Surprisingly easy to generate interactive dashboards
    • Growing number of users

Objective

  • Using examples we aim to demonstrate that interactive tools can simplify our workflow, from data and model exploration to communication
  • Examples:
    1. RStrap Explorer: A tool for examining fishery-independent survey data
    2. Tag Explorer: A mapping tool developed for the exploration of a long-term tagging study
    3. NCAM Explorer: A tool for exploring results from the Northern Cod Assessment Model

RStrap Explorer

  • Fisheries-independent surveys have become a mainstay in stock assessment
  • Stratified-random surveys have been conducted by DFO for > 40 years
  • Typically analyzed using stratified analyses (RStrap in NL region)



  Canadian Coast Guard | Twitter

RStrap Explorer

  • Running a series of stratified analysis can be cumbersome
library(Rstrap)

## Load survey data
load("converted_set_details_2017-04-27.Rdata")
load("converted_length-frequency_data_2017-04-27.Rdata")
load("age-growth_data_2017-04-27.Rdata")

## 3NO Witch Flounder
witch <- strat.fun(setdet = setdet, data.series = "Campelen", 
                   species = 890, survey.year = 1995:2012, 
                   season = "spring", NAFOdiv = c("3N", "3O"))

## 3K Roughhead Grenadier (length disaggregated)
grenadier <- strat.fun(setdet = setdet, lf = lf, data.series = "Campelen", 
                       program = "strat2 & strat1", species = 474, survey.year = 2012, 
                       season = "fall", NAFOdiv = "3K", strat = 622:654, sex = "unsexed", 
                       length.group = 0.5, group.by = "length")

## 2J3KL Greenland Halibut (length and age disaggregated)
turbot <- strat.fun(setdet = setdet, lf = lf, ag = ag, data.series = "Campelen", 
                    program = "strat2 & strat1", species = 892, survey.year = 1998:2012, 
                    season = "fall", NAFOdiv = c("2J", "3K", "3L"), 
                    sex = c("male","female","unsexed"), length.group = 1, 
                    group.by = "length & age")

## 3Ps Atlantic Cod (length and age disaggregated)
cod <- strat.fun(setdet = setdet, lf = lf, ag = ag, data.series = "Campelen", 
                 program = "strat2 & strat1", species = 438, survey.year = 1998:2012, 
                 season = "spring", NAFOdiv = "3P", sex = c("male","female","unsexed"), 
                 length.group = 1, group.by = "length & age")
  • This doesn’t include code for plotting these results

RStrap Explorer

  • A dashboard was created using the shiny, flexdashboard, plotly, and crosstalk packages to dynamically run and explore RStrap results
  • Four primary pages:
    1. Survey Indices contains stock level estimates of biomass and abundance
    2. Age & Length Distributions contains length and age frequency plots
    3. Recruitment displays recruitment indices
    4. Help provides additional context to the survey data and analysis

RStrap Explorer

RStrap Explorer

Tag Explorer

  • For some data-rich stocks, mark and recapture studies are carried out to estimate movement, growth rate, natural mortality, etc.
  • There is a long-standing tagging program for Northern cod
    • >60 years, >60,000 records, 1,000 - 10,000 tags deployed annually

Photo: John Brattey

Tag Explorer

  • Spatial explorations of these data have been limited since the seminal work by Taggart et al. 1995

  • Nearly 500 pages!

Tag Explorer

  • A dashboard was created using the shiny, shinydashboard, and leaflet packages to dynamically explore this large data-set
  • Contains
    • One primary page, Main map, where release and recovery locations are mapped
    • A series of summary pages where these data are summarized

Tag Explorer

Tag Explorer

NCAM Explorer

  • Integrated stock assessment models are becoming more common
  • Advances in computational power and methods \(\rightarrow\) possibilities
  • Requires a solid understanding of the inputs, methods and outputs
    • Understanding is a prerequisite for communication

Process equations

Stochastic cohort model with a plus group to model the unobserved states: \[\log(N_{a,y}) = \left\{\begin{matrix} \log(N_{a-1,y-1}) - Z_{a-1,y-1} + \delta_{a,y}, & a < A \\ \log\{N_{a-1,y-1}\exp(-Z_{a-1,y-1}) + N_{a,y-1}\exp(-Z_{a,y-1})\} + \delta_{a,y}, & a = A. \end{matrix}\right. \]

The ages are 1-10+ and years are 1975-2015. \(Z_{a,y} = F_{a,y} + M_{a,y}\), where \(M_{a,y} = 0.2\) is the base case assumption.

Recruitments, \(N_{1,1}, ... N_{1,Y}\), are treated as uncorrelated lognormal random variables \[\log(N_{1,y}) \overset{iid}\sim N(r, \sigma_{r}^2).\]

Catches are modeled using the Baranov catch equation, \[C_{a,y} = N_{a,y}\{1 - \exp(-Z_{a,y})\}F_{a,y}/Z_{a,y}.\]

Fishing moralities are modeled as a stochastic process, with \[Cov\{\log(F_{a,y}),\log(F_{a-j,y-k})\} = \frac{\sigma_{F}^2 \varphi_{F,a}^j \varphi_{F,y}^k}{(1-\varphi_{F,a}^2)(1-\varphi_{F,y}^2)}.\]

Observation equations

The model predicted catch for survey \(s\) is \[\log(I_{s,a,y}) = \log(q_{s,a}) + \log(N_{a,y}) - t_{s,y}Z_{a,y} + \varepsilon_{s,a,y}, ~~ \varepsilon_{s,a,y} \overset{iid}\sim N(0, \sigma_{s,G(a)}^2).\]

Survey variance was split out and self-weighted by age groups 1-3, 4-7, and 8-10+

Total catch and age compositions were treated separately. Total catch was modeled as lognormal, \[\log(C_{obs,y}) = \log(C_{y}) + \varepsilon_{C,y}, ~~ \varepsilon_{C,y} \overset{iid}\sim N(0, \sigma_{C}^2)\] Age compositions were modeled as multiplicative logistic normal with a censored component for zero’s

NCAM Explorer

  • Challenge: the data-rich case of Northern cod
    • Assessed using an age-structured, state-space assessment model, called NCAM, which integrates:
      • Research vessel autumn trawl surveys (1983-present)
      • Sentinel fishery surveys (1995-present)
      • Inshore acoustic surveys (1995-2009)
      • Fishery catch-at-age compositions and partial fishery landings (1983-present)
      • Tagging data (1983-present)

NCAM Explorer

  • Communication: standard approach involves compiling and presenting static documentation

Code


\(\rightarrow\)

Plots & Tables


\(\rightarrow\)

Documentation


  • Involves a lot of copy-pasting
  • Important details may not be visible
  • Linear format may be the best way to explore ideas

NCAM Explorer

  • A dashboard was created using the flexdashboard, plotly, and crosstalk packages to explore and communicate results from NCAM

Code


\(\rightarrow\)

HTML


  • Contains a series of pages with plots and tables typically presented at assessment meetings

NCAM Explorer

Interactive vs. static

  • Static formats are useful for explaining ideas
  • Interactive formats are useful for exploring ideas
    • Easy and efficient access to the details via drop-down filters and data-rich illustrations
    • Navigation bar circumvents scrolling through pages or digging through files
    • Bonus: automation circumvents copy-pasting

Towards open stock-assessment


Data


\(\rightarrow\)

Code


\(\rightarrow\)

Models


\(\rightarrow\)

Code


\(\rightarrow\)

Document


\(\rightarrow\)

Discuss


  • Although these tools do not reveal the entire “data pipeline”, transparency is improved
  • Accessible to a broad audience \(\rightarrow\) interdisciplinary input
  • Greater access \(\rightarrow\) richer peer-review
  • Richer peer-review \(\rightarrow\) improved and widely supported science advice

Conclusion

  • There is a cost to developing interactive tools
  • However, the learning curve is relatively shallow
    • The tools highlighted here were developed by ecologists with R experience
  • Benefits > cost
    • Efficient delivery of products
    • Richer explorations and discussions
    • Collective understanding

Acknowledgements

We thank the numerous colleagues and participants of various stakeholder and stock assessment meetings who encouraged us to further develop these interactive visualization tools, and especially those who took the time to make suggestions on how to make them more accessible and useful.

Thank you!